﻿using System;

namespace DenisVuyka.Controls.PropertyGrid.Metadata
{
  [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
  public class NumberRangeAttribute : Attribute
  {
    public double Minimum { get; private set; }
    public double Maximum { get; private set; }
    public double Tick { get; private set; }
    public double Precision { get; private set; }

    public NumberRangeAttribute(double minimum, double maximum, double tick)
      : this(minimum, maximum, tick, 0)
    {
    }

    public NumberRangeAttribute(double minimum, double maximum, double tick, double precision)
    {
      this.Minimum = minimum;
      this.Maximum = maximum;
      this.Tick = tick;
      this.Precision = precision;
    }
  }
}
